<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<f:view>
	<h:head>
		<title>Admin</title>
		<h:outputStylesheet library="css" name="bootstrap.css" />
	</h:head>
	<h:body>
		<div class="modal" style="width: 60%; left: 40%">
			<div class="modal-header">
				<h2 style="display: inline; vertical-align: middle">
					<h:outputText value="#{dataHolderBean.user.fullName}" />
				</h2>
				<h:outputLink value="info.xhtml">
					<f:param name="id" value="#{dataHolderBean.user.id}" />
					<h:graphicImage library="img" name="info.png" width="25"
						height="25" />
				</h:outputLink>
			</div>
			<h:form styleClass="form-horizontal modal-form">
				<div class="modal-body">
					<h:dataTable value="#{adminBean.userList}"
						styleClass="table table-bordered" var="data">
						<h:column>
							<f:facet name="header"></f:facet>
							<p:selectBooleanCheckbox value="#{data.selected}" />
						</h:column>
						<h:column>
							<f:facet name="header">User name</f:facet>
							<h:outputLink value="daily_plan.xhtml">
								<f:param name="id" value="#{data.id}" />
								<h:outputText value="#{data.fullName}" />
							</h:outputLink>
						</h:column>
						<h:column>
							<f:facet name="header">Status</f:facet>
									#{data.userStatus}
								</h:column>
						<h:column>
							<f:facet name="header">Info</f:facet>
							<h:outputLink value="info.xhtml">
								<f:param name="id" value="#{data.id}" />
								<h:outputText value="Info" />
							</h:outputLink>
						</h:column>
					</h:dataTable>
				</div>
				<div class="modal-footer">
					<h:commandButton value="Approve" styleClass="btn btn-primary"
						action="#{adminBean.approve}" />
					<h:commandButton value="Send E-mail" styleClass="btn" />
					<h:commandButton value="Delete" styleClass="btn"
						action="#{adminBean.delete}" />
					<h:link value="Daily plan" styleClass="btn" outcome="daily_plan"
						rendered="#{dataHolderBean.user.user}" />
				</div>
			</h:form>
		</div>
	</h:body>
</f:view>
</html>